package com.leslie.hhcommunity.service;

import com.leslie.hhcommunity.entity.Message;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author
 * @PackageName:com.leslie.hhcommunity.service
 * @ClassnName:MessageService
 * @Description:
 * @Date 2022/1/4  20:47
 */
public interface MessageService {

	List<Message> selectConversations(@Param("userId") int userId, @Param("offset") int offset, @Param("limit") int limit);

	int selectConversationCount(int userId);

	List<Message> selectLetters(@Param("conversationId") String conversationId, @Param("offset") int offset, @Param("limit") int limit);

	int selectLetterCount(String conversationId);

	int selectLetterUnreadCount(@Param("userId") int userId, @Param("conversationId") String conversationId);

	int insertMessage(Message message);

	int updateStatus(@Param("ids") List<Integer> ids, @Param("status") int status);

	Message selectLatesNotice(@Param("userId") int userId, @Param("topic") String topic);

	int selectNoticeCount(@Param("userId") int userId, @Param("topic") String topic);

	int selectNoticeUnreadCount(@Param("userId") int userId, @Param("topic") String topic);

	List<Message> selectNotices(@Param("userId") int userId, @Param("topic") String topic, @Param("offset") int offset, @Param("limit") int limit);


}
